﻿Public Class DwarvenWarriorObj
    Inherits HeroObj

    Public Sub New()
        _attacks = 1
        _damage = 1
        _endurance = 4
        _luck = 0
        _maxHealth = AppConstants.D6Roll + 8
        If _maxHealth = 9 Then _maxHealth = AppConstants.D6Roll + 8 'reroll if first roll was one
        _meleeSkill = 4
        _move = 4
        _pinning = 5
        _rangedSkill = 5
        _strength = 3
        _wit = 2

        HeroClassId = eHeroClass.DwarvenWarrior
        Level = 1
        CurrentHealth = _maxHealth
        Gold = 0

        Name = GenerateName()

    End Sub

    Public Overrides Function GenerateName() As String

        Dim dieRoll As Short = AppConstants.D100Roll

        Dim name As String = String.Empty

        Select Case dieRoll

            Case Is < 11
                name = "Bardin"

            Case 11 To 20
                name = "Dimzad"

            Case 21 To 30
                name = "Imrak"

            Case 31 To 40
                name = "Garil"

            Case 41 To 50
                name = "Nargond"

            Case 51 To 60
                name = "Storri"

            Case 61 To 70
                name = "Kargun"

            Case 71 To 80
                name = "Hagrin"

            Case 81 To 90
                name = "Ragnar"

            Case 91 To 100
                name = "Durak"

        End Select

        Return name

    End Function

End Class